﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PopUpPage.aspx.cs" Inherits="PopUpPage" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        html {
            background: transparent !important;
        }

        body {
            background: transparent !important;
        }
    </style>
    <script src="Scripts/jquery-2.0.3.min.js"></script>
    <script src="Scripts/GlobalFunctions.js"></script>
    <script type="text/javascript">
        function DialogForm_ShowFrame(headerText, editForm, queryString, event, width, height) {
            parent.DialogForm_ShowFrame(headerText, editForm, queryString, event, width, height);
        }

        function DialogForm_CloseFrame(returnValue, msgType) {
            parent.CloseDialogFrame(returnValue, msgType);
        }

        function DialogForm_HideFrame() {
            parent.HideDialogFrame();
        }
    </script>
</head>
<body>
    <form id="frmMain" runat="server">
        <dx:ASPxGlobalEvents ID="globalEventManager" runat="server">
            <ClientSideEvents ControlsInitialized="function(s, e){ OnControlsInitialized(s, e); }"></ClientSideEvents>
        </dx:ASPxGlobalEvents>
        <dx:ASPxLoadingPanel ID="loadingPanelDialog" runat="server" ClientInstanceName="DialogLoadingPanel" Modal="True" />
        <dx:ASPxPopupControl ID="popupControl" runat="server" ClientInstanceName="popupControl"
            PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ShowCloseButton="false"
            Modal="True" AllowDragging="True" CloseAction="CloseButton" AutoUpdatePosition="True">
            <ContentCollection>
                <dx:PopupControlContentControl runat="server">
                    <div id="centralDiv">
                        <asp:PlaceHolder runat="server" ID="phCenter" />
                    </div>
                </dx:PopupControlContentControl>
            </ContentCollection>
            <ClientSideEvents CloseUp="function(s,e){ DialogForm_HideFrame(); }" />
        </dx:ASPxPopupControl>
        <script type="text/javascript">
            function OnControlsInitialized(s, e) {
                $('#centralDiv').bind('resize', function () {
                    popupControl.UpdatePosition();
                });
                popupControl.Show();
                setTimeout(function () {
                    $(':input:enabled:visible:first').focus();
                }, 50);
            }
        </script>
    </form>
</body>
</html>
